import request from '@/utils/request'

// 查询采购入库列表
export function listIn(query) {
  return request({
    url: '/system/in/list',
    method: 'get',
    params: query
  })
}

// 查询采购入库详细
export function getIn(id) {
  return request({
    url: '/system/in/' + id,
    method: 'get'
  })
}

// 新增采购入库
export function addIn(data) {
  return request({
    url: '/system/in',
    method: 'post',
    data: data
  })
}

// 修改采购入库
export function updateIn(data) {
  return request({
    url: '/system/in',
    method: 'put',
    data: data
  })
}

// 删除采购入库
export function delIn(id) {
  return request({
    url: '/system/in/' + id,
    method: 'delete'
  })
}


export function fetchMatIdsByBuyOrdId(buyOrdId) {
  return request({
    url: '/system/details/ord/matIds',
    method: 'get',
    params: { buyOrdId }
  })
}
